<!--<?php
$newusers=$db->row_select("users","groupid<100 or groupid>200",6,"id,username,signuptime","id desc");
$activeusers=$db->row_select("users","groupid<100 or groupid>200",6,"id,username,lastposttime","lastposttime desc");
$newtopics=$db->row_select("topics","verifystate=0 and isrecycle=0",10,"id,title,username,posttime,ordertime,lastreply","ordertime desc");
print <<<EOT
-->
<div class="div_out_inner_nobg position"><span>当前位置:</span> {$_SYS['positionindex']} » <a href="{$_SYS['indexurl']}">首页</a></div>
<table class="index_adobe">
<tr>
<td class="index_adobe_left">
<div class="index_top">
	<table class="index_toptable">
		<tr>
			<td class="left"></td>
			<td>主题:{$cache1['topicsnum']}, 帖子:{$cache1['postsnum']}, 今日:<span class="spc">{$cache1['todaynum']}</span>, 昨日:{$cache1['yesterdaynum']}, 最高日:{$cache1['mostnum']}, 会员:{$cache1['usersnum']}, 新会员:<a href="user.php?username={$cache1['lastuser']}" class="spc">{$cache1['lastuser']}</a></td>
			<td class="right"></td>
		</tr>
	</table>
</div>
{$adcode[3]}
<!--
EOT;
if(!empty($announce_index)){
print <<<EOT
-->
<div class="index_anc">
	<div id="announce_index_div">{$announce_index}</div>
</div>
<!--
EOT;
}
print <<<EOT
-->

<div class="index_forum">
	<table class="title">
		<tr>
			<td class="left"></td>
			<td>论坛版块</td>
			<td class="right"></td>
		</tr>
	</table>
	<div class="index_fourm_out">
	<div class="div_clear" style="height:6px;"></div>
	
<!--
EOT;
foreach($cache_forums as $forum){
	if(intval($forum['pid'])>0 || (!empty($_GET['fid']) && intval($_GET['fid'])!=intval($forum['id']))){
		continue;
	}
	print<<<EOT
-->
	<div class="index_forum_1"><span class="folder_1" id="folder_{$forum['id']}" onclick="forumFolder({$forum['id']})">{$forum['forumname']}</span></div>
	<div class="index_forum_2" id="folderdiv_{$forum['id']}">
<!--
EOT;
	if(is_array($forum['childfid'])){
		foreach($forum['childfid'] as $cfid){
			$childforum=$cache_forums[$cfid];
			if($childforum['ishidden']=='1'){continue;}
			$forumurl=genUrl("forum.php?fid={$cfid}");
			$viewurl=genUrl("view.php?tid={$childforum['lasttid']}");
			$childforum['lastuser']=htmlFilter($childforum['lastuser']);
			if($forum['showtype']=='0'){
				print<<<EOT
-->
			<table class="index_a3"><tbody><tr><td class="index_a3_0"><img src="{$childforum['forumicon']}" border="0" /></td><td class="index_a3_1"><b><a href="{$forumurl}">{$childforum['forumname']}</a></b> (今日:<b class="today">{$childforum['todaynum']}</b>)<p>版主: {$childforum['adminsstr']}</p></td><td width="140px" align="center"><span class="topicsnum">{$childforum['topicsnum']}</span> / {$childforum['postsnum']}</td><td width=""><a href="{$viewurl}">{$childforum['lastpost']}</a><br /><a href="user.php?username={$childforum['lastuser']}">{$childforum['lastuser']}</a> - <span class="time">{$childforum['lastposttime']}</span></td></tr></tbody></table>
<!--
EOT;
			}else{
				print<<<EOT
-->
			<div class="index_b"><table class="index_b3"><tbody><tr><td class="index_b3_0"><img src="{$childforum['forumicon']}" border="0" /></td><td class="index_b3_1"><b><a href="{$forumurl}">{$childforum['forumname']}</a></b> (今日:<b class="today">{$childforum['todaynum']}</b>)<br />主题:{$childforum['topicsnum']}  &nbsp;帖子:{$childforum['postsnum']}<br /><span class="lastpost">最后发表:<a href="{$viewurl}">{$childforum['lastuser']}</a></span></td></tr></tbody></table></div>
<!--
EOT;
			}
		}
	}
	print<<<EOT
-->
	<div class="div_clear"></div>
	</div>
<!--
EOT;
}
print<<<EOT
-->
	</div>
</div>
<div class="div_clear" style="height:12px;"></div>
<div class="index_else">
	<table class="title">
		<tr>
			<td class="left"></td>
			<td>论坛其他</td>
			<td class="right"></td>
		</tr>
	</table>
	<div class="index_else_out">
		<div class="index_a4"><b><a href="online.php">在线用户</a></b> - 共 <b>{$online_allnum}</b> 人在线, <b>{$online_usernum}</b> 位会员, <b>{$online_guessnum}</b> 位访客, 最多 <b>{$cache1['mostonlinenum']}</b> 人发生在 <b>{$cache1['mostonlinetime']}</b> </div>
<!--
EOT;
if(numFilter($cache_settings['indexmostonline'])>0){
print <<<EOT
-->
		<div class="index_a5"><img src="images/group/203.gif" border="0" align="absmiddle" /> 管理员&nbsp; <img src="images/group/202.gif" border="0" align="absmiddle" /> 超级版主&nbsp; <img src="images/group/201.gif" border="0" align="absmiddle" /> 版主&nbsp; <img src="images/group/204.gif" border="0" align="absmiddle" /> 荣誉会员&nbsp; <img src="images/group/1.gif" border="0" align="absmiddle" /> 会员&nbsp;</div>
		<div class="index_a5_online">
		<ul>
<!--
EOT;

foreach($index_onlines as $online_online){
print<<<EOT
-->
		<li><img src="images/group/{$online_online['onlineicon']}.gif" border="0" align="absmiddle" /> {$online_online['name']}</li>
<!--
EOT;
}
print<<<EOT
-->		
		</ul>
		</div>
<!--
EOT;
}
print<<<EOT
-->			
		<div class="index_a4"><b>友情链接</b></div>
		<div class="index_a6">
<!--
EOT;
foreach($cache_links_logo as $link){
print<<<EOT
-->
		<a href="{$link['url']}" target="_blank" title="{$link['content']}"><img src="{$link['logo']}" border="0" /></a>
<!--
EOT;
}
print<<<EOT
-->
	</div>
	<div class="index_a7">
<!--
EOT;
foreach($cache_links_text as $link){
print<<<EOT
-->
		<p><a href="{$link['url']}" target="_blank" title="{$link['content']}">{$link['name']}</a></p>
<!--
EOT;
}
print<<<EOT
-->
	<div class="div_clear" style="height:1px;"></div>
    </div>
	</div>
</div>
</td>
<td class="index_adobe_middle"></td>
<td class="index_adobe_right">
<!-- 
EOT;
if(!isLogin()){
print <<<EOT
-->
<div class="index_right_title">会员登录</div>
<form action="login.php?action=login" method="POST">
<table class="index_rtd0">
<tr><td class="index_rtd1">用户名:</td><td class="index_rtd2"><input type="text" value="用户名" size="22" name="username" onmouseover="this.focus();this.select()" tabIndex="100" title="用户名" class="text_css" /></td></tr>
<tr><td class="index_rtd1">密码:</td><td class="index_rtd2"><input type="password" value="" size="22" name="userpass" tabIndex="101" title="密码" class="text_css" /></td></tr>
<!--
EOT;
if($cache_settings['loginsecuritycode']=='1'){
print <<<EOT
-->
<tr><td class="index_rtd1">验证码:</td><td class="index_rtd2"><input type="text" style="width:40px;" name="securitycode" id="securitycode" tabIndex="102" title="验证码" value="验证码" onmouseover="this.select()" class="text_css" /> <a href="javascript:reloadVerify('securitycodeimg')" title="看不清楚？点击刷新验证码"><img src="code.php?t={$_SYS['time']}" align="absmiddle" border="0" id="securitycodeimg" /></a></td></tr>
<!--
EOT;
}
print <<<EOT
-->
<tr><td class="index_rtd1"></td><td class="index_rtd2"><input type="submit" class="button_css" value="登 录" tabIndex="103" /> <a href="{$cache_settings['signupfilename']}" class="spc">注册</a></td></tr>
</table>
</form>
<!-- 
EOT;
}else{
print <<<EOT
-->
<table class="index_rlog0">
<tr><td rowspan=2 class="index_rlog1"><a href="{$_SYS['userurl']}"><img src="userpic.php?uid={$lg['userid']}&type=small" class="index_userpic" align="absmiddle" /></a></td><td class="index_rlog2"><span>{$mygroupname}</span><u class="star_img" title="{$mygroupname}">{$mygroupstar}</u></td></tr>
<tr><td class="index_rlog3"><a href="member.php?action=mytopic">我的帖子</a> | {$msg_link}</td></tr>
</table>
<!-- 
EOT;
}
print <<<EOT
-->
<div class="index_right_title">最新注册</div>
<div class="index_right_newmember">
<ul>
<!--
EOT;
foreach($newusers as $newuser){
	$newuser['signuptime']=getDateStr($newuser['signuptime']);
	$newuser['userurl']=genUrl("user.php?uid={$newuser['id']}");
	$newuser['username']=htmlFilter($newuser['username']);
print<<<EOT
-->
	<li><a href="{$newuser['userurl']}" title="{$newuser['username']} 注册于 {$newuser['signuptime']}" target="_blank"><img src="userpic.php?type=small&uid={$newuser['id']}" border="0" /></a><span><a href="{$newuser['userurl']}" title="{$newuser['username']} 注册于 {$newuser['signuptime']}" target="_blank">{$newuser['username']}</a></span></li>
<!-- 
EOT;
}
print <<<EOT
-->
</ul>
<div class="div_clear"></div>
</div>
<div class="index_right_title">活跃用户</div>
<div class="index_right_newmember">
<ul>
<!--
EOT;
foreach($activeusers as $activeuser){
	$activeuser['lastposttime']=getDateStr($activeuser['lastposttime']);
	$activeuser['userurl']=genUrl("user.php?uid={$activeuser['id']}");
	$activeuser['username']=htmlFilter($activeuser['username']);
	print<<<EOT
-->
	<li><a href="{$activeuser['userurl']}" title="{$activeuser['username']} 于 {$activeuser['lastposttime']} 发帖" target="_blank"><img src="userpic.php?type=small&uid={$activeuser['id']}" border="0" /></a><span><a href="{$activeuser['userurl']}" title="{$activeuser['username']} 于 {$activeuser['lastposttime']} 发帖" target="_blank">{$activeuser['username']}</a></span></li>
<!-- 
EOT;
}
print <<<EOT
-->
</ul>
<div class="div_clear"></div>
</div>
<div class="index_right_title">最新主题</div>
<div class="index_right_topics">
<ul>
<!--
EOT;
foreach($newtopics as $newtopic){
	$newtopic['title']=htmlFilter($newtopic['title']);
	$newtopic['username']=htmlFilter($newtopic['username']);
	$viewurl=genUrl("view.php?tid={$newtopic['id']}");
	if($newtopic['posttime']==$newtopic['ordertime']){
		$newtopic['posttime']=getDateStr($newtopic['posttime']);
		$linktitle="{$newtopic['username']} 发表于 {$newtopic['posttime']}";
	}else{
		$lastre=explode("\t",$newtopic['lastreply']);
		$linktitle=htmlFilter($lastre[1])." 回复于 ".getDateStr($lastre[0]);
	}
	print<<<EOT
-->
	<li><a href="{$viewurl}" title="{$linktitle}" target="_blank">{$newtopic['title']}</a></li>
<!-- 
EOT;
}
print <<<EOT
-->
</ul>
</div>
</td>
</tr>
</table>

{$adcode[2]}
<script type="text/javascript" src="getfiles.php?t=js&v={$_SYS['VERSION']}&f=util|index"></script>
<!--
EOT;
if(!empty($announce_index)){
print <<<EOT
-->
<script type="text/javascript">
window.onload=function(){
       var o=E("announce_index_div");
       window.setInterval(function(){scrollup(o,22,0);},3000);
}
</script>
<!--
EOT;
}
print <<<EOT
-->

<!--
EOT;
?>
-->